package com.shujia.flink.tf

import org.apache.flink.streaming.api.scala._

object Demo8Union {
  def main(args: Array[String]): Unit = {
    val env: StreamExecutionEnvironment = StreamExecutionEnvironment.getExecutionEnvironment

    val ds1: DataStream[Int] = env.fromCollection(List(1, 2, 3, 4, 5))
    val ds2: DataStream[Int] = env.fromCollection(List(1, 2, 3, 4, 5))


    //将多个流合并成一个流
    val ds3: DataStream[Int] = ds1.union(ds2)

    ds3.print()

    env.execute()

  }

}
